{extend  name="manage@public/layout" /}
{block name="content"}
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        {if ( $data['admin_auth']['level'] == 4)  } 
                        <h5 style="margin:-5px 5px 0px !important;">
                            <button onClick="modaldemo(0)" style="padding:4px;margin-bottom:0 !important" type="button" class="btn btn-primary btn-xs">添加</button>
                        </h5>
                        
                        {else /} 
                        <h5>学员信息列表</h5>
                        {/if}
                            
                       
                        <div class="ibox-tools">
                            <a class="collapse-link" onclick="location.replace(location.href);">
                                <i class="fa fa-refresh"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="table-responsive">
                            <!--- 搜索--->
                            <form action="" method="post">
                                <div class="col-sm-1 col-sm-on">
                                    <input name="keyword" placeholder="姓名/号码" value="{notempty name="data['keyword']"}{$data['keyword']}{/notempty}" class="form-control input-sm layer-date">
                                </div>
                                <div class="col-sm-1 col-sm-on">
                                    <input name="school_name_l" placeholder="学校名称" value="{notempty name="data['school_name_l']"}{$data['school_name_l']}{/notempty}" class="form-control input-sm layer-date">
                                </div>
                                <div class="col-sm-1 col-sm-on">
                                    <input name="order_sn" placeholder="学员编号" value="{notempty name="data['order_sn']"}{$data['order_sn']}{/notempty}" class="form-control input-sm layer-date">
                                </div>
                                <div class="col-sm-1 col-sm-on">
                                    <input name="identity_card" placeholder="身份证号" value="{notempty name="data['identity_card']"}{$data['identity_card']}{/notempty}" class="form-control input-sm layer-date">
                                </div>
                                {if $data.admin_auth.level != 4 }
                                <div class="col-sm-1 col-sm-on">
                                    <input name="nickname" placeholder="录入者" value="{notempty name="data['nickname']"}{$data['nickname']}{/notempty}" class="form-control input-sm layer-date">
                                </div>
                                <div class="col-sm-1 col-sm-on">
                                    <input name="company_name" placeholder="公司名称" value="{notempty name="data['company_name']"}{$data['company_name']}{/notempty}" class="form-control input-sm layer-date">
                                </div>
                                {/if}
                                <div class="col-sm-2 col-sm-on">
                                    <select name="type" class="input-sm form-control input-s-sm inline">
                                        <option value="0" >报考类型</option>
                                        {volist name="type" id="vo"}
                                            <option {notempty name="data['type']"}{eq name="data['type']" value="$vo.id"}selected{/eq}{/notempty} value="{$vo.id}">{$vo.title}</option>
                                        {/volist}
                                    </select>
                                </div>
                                <div class="col-sm-4 col-sm-on col-sm-auto">
                                    <input style="width:155px;cursor:not-allowed;" placeholder="开始日期" class="input-sm form-control form-control layer-date" name="start" value="{empty name="data['start']"}{else/}{$data.start}{/empty}" readonly id="start"><i style="position: relative;top:5px;">&nbsp;-&nbsp;</i>
                                    <input style="width:155px;cursor:not-allowed;" placeholder="结束日期" class="input-sm form-control form-control layer-date" name="end" value="{empty name="data['end']"}{else/}{$data.end}{/empty}" readonly id="end">
                                </div>
                                <div class="col-sm-1 col-sm-botton">
                                    <div class="input-group">
                                        <button type="submit" class="btn btn-sm btn-primary"><i class="fa fa-search"></i></button>
                                    </div>
                                </div>
                                <!-- <div class="col-sm-1 col-sm-botton">
                                    <div class="input-group">
                                        <button title="导出" name="platform_export" value="export" type="submit" class="btn btn-sm btn-primary"><i class="fa fa-download"></i></button>
                                    </div>
                                </div> -->
                            </form>
                            <!--- end --->
                            <table class="table table-striped table-bordered">
                                <thead>
                                    <tr>
                                        <th>序号</th>
                                        <th>学员编号</th>
                                        <th>姓名</th>
                                        <th>身份证</th>
                                        <th>手机号码</th>
                                        <th>报考学院</th>
                                        <th>报考类型</th>
                                        <th>报考层次</th>
                                        <th>报考专业</th>
                                        <th>创建时间</th>
                                        {if $data.admin_auth.level != 4 } 
                                        <th>录入者</th>
                                        {/if}
                                        <th>协议金额</th>
                                        <th>未交金额</th>
                                        <th>所属公司</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {volist name="list" id="vo"}
                                    <tr>
                                        <td>{$vo.id}</td>
                                        <td>{$vo.order_sn}</td>
                                        <td>{$vo.user_name}</td>
                                        <td>{$vo.identity_card}</td>
                                        <td>{$vo.phone}</td>
                                        <td>{$vo.school_name}</td>
                                        <td>{$vo.title}</td>
                                        <td>{$vo.hierarchy}</td>
                                        <td>{$vo.professional}</td>
                                        <td>{$vo.create_time}</td>
                                        {if $data.admin_auth.level != 4 } 
                                        <td>{$vo.account_name}</td>
                                        {/if}
                                        <td>{:\\app\\model\\ChargeModel::agreementPrice($vo.order_sn)}</td>
                                        <td>{:\\app\\model\\ChargeModel::overduePrice($vo.order_sn)}</td>
                                        <td>{$vo.company_name}</td>
                                        <td>
                                            {eq name="data.admin_auth.level" value="4"}
                                            {if $vo.state == 1 } 
                                                <a style="border: 1px solid #05b52b;color: #05b52b;" href="{:url('/manage/addEntry',['id'=>$vo.order_sn])}" title="添加缴费" type="button" class="btn btn-sm bt-acc-del btn-white"><i class="fa fa-edit"></i>&nbsp;添加缴费</a>
                                            {elseif $vo.state == 2 /}
                                                <a style="border: 1px solid #0d88f3;color: #0d88f3;" href="{:url('/manage/supplement',['id'=>$vo.order_sn])}" title="补交学费" type="button" class="btn btn-sm bt-acc-del btn-white"><i class="fa fa-edit"></i>&nbsp;补交学费</a>
                                            {else /} 
                                                <span class="btn btn-sm btn-white"><i class="fa fa-ban"></i>&nbsp;缴费完成</span>
                                            {/if}
                                            <!-- <button style="color:red;border:1px solid red;" title="删除" type="button" data-id="{$vo.id}" class="btn btn-sm bt-mch-del btn-white"><i class="fa fa-trash-o"></i>&nbsp;删除</button> -->
                                            {else/}
                                            <span class="btn btn-sm btn-white"><i class="fa fa-ban"></i>&nbsp;无可操作</span>
                                            {/eq}
                                        </td>
                                    </tr>
                                    {/volist}
                                </tbody>
                            </table>
                            <div style="float:right;" class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
                                {$page|raw}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div> 

 <!-- 弹框 --->
 <div id="modal-demo" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" >
    <div class="modal-dialog">
        <div class="modal-content radius">
            <div class="modal-header">
                <h3 class="modal-title">添加学员信息</h3>
                <a class="close" data-dismiss="modal" aria-hidden="true" href="javascript:void();">×</a>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <label class="col-sm-2 control-label">姓名</label>
                    <div class="col-sm-7">
                        <input type="text" placeholder="请填写学员姓名" name="user_name" class="form-control">
                    </div>
                </div>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <label class="col-sm-2 control-label">身份证</label>
                    <div class="col-sm-7">
                        <input type="text" placeholder="请填写身份证" id="identity_card" name="identity_card" class="form-control">
                    </div>
                </div>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <label class="col-sm-2 control-label">手机号码</label>
                    <div class="col-sm-7">
                        <input type="text" placeholder="请填写号码" name="phone" class="form-control">
                    </div>
                </div>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <label class="col-sm-2 control-label">报考学院</label>
                    <div class="col-sm-7">
                        <input type="text" placeholder="请填写学院" name="school_name" class="form-control">
                    </div>
                </div>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <label class="col-sm-2 control-label">报考类型</label>
                    <div class="col-sm-7">
                        <select id="type" class="form-control m-b" name="type">
                            <option value="0">请选择</option>
                            {volist name="type" id="vo"}
                            <option value="{$vo.id}">{$vo.title}</option>
                            {/volist}
                        </select>
                    </div>
                </div>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <label class="col-sm-2 control-label">报考层次</label>
                    <div class="col-sm-7" id="gradation">
                        <select id="gradation_s" class="form-control m-b" disabled>
                            <option value="0">请选择</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <label class="col-sm-2 control-label">报考专业</label>
                    <div class="col-sm-7">
                        <input type="text" placeholder="请填写报考专业" name="professional" class="form-control">
                    </div>
                </div>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <label class="col-sm-2 control-label">考试地址</label>
                    <div class="col-sm-7">
                        <input type="text" placeholder="请填写考试地址" name="address" class="form-control">
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button class="btn btn-primary btn-students">确定</button>
                <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
            </div>
        </div>
    </div>
</div>
<!--  end --->
<!-- 弹框 --->
{/block}
{block name="script"}
<script src="/static/js/admin/students.js?v=1.2"></script>
<script>
    //时间插件
    var start = {
        elem:"#start",
        format:"YYYY-MM-DD hh:mm:ss",
        min:$("input[name='st_start']").val(),
        max:$("input[name='st_end']").val(),
        istime:true,
    };
    var end = {
        elem:"#end",
        format:"YYYY-MM-DD hh:mm:ss",
        min:$("input[name='st_start']").val(),
        max:$("input[name='st_end']").val(),
        istime:true,
    };
    laydate(start);laydate(end);


    function modaldemo() {
        $("#modal-demo").modal("show");
    }
</script>
{/block}




